/*
 * Please see the included README.md file for license terms and conditions.
 */


/*jslint browser:true, devel:true, white:true, vars:true */
/*global $:false, intel:false app:false, dev:false, cordova:false */



// This file contains your event handlers, the center of your application.
// See app.initEvents() in init-app.js for event initialization.

// function myEventHandler() {
//     "use strict" ;
// // ...event handler code here...
// }


// ...additional event handlers here...
//var baseurl = "http://192.168.10.15/wnsgbl-repo/mobileapp/";
var baseurl = "http://localhost/wnsgbl-repo/mobileapp/";
getDataTravel();
function getDataTravel()
{
	
	$.ajax({
		url:baseurl+"get_travel",
		type:"POST",
		success:function(data)
		{
			var target = $("#show_travel_post");
			$.each( data, function( key, value ) 
			{
				var title = value.postTitle;
				var html = '<div class="col-sm-6 col-md-4"><div class="thumbnail"><div class="caption"><h4>'+title+'</h4></div></div></div>';
				target.append(html);
				console.log("Travel Data Loaded");
			});
			$("#show_travel_post").after( "<button class='btn btn-primary btn-lg'>Load More</button>" );
		}
	});
	
}


